<template>
  <div class="order-container">
    <ItemView v-for="(item, index) in orderList" :key="index" :data="item" />
    <div class="order-pay">
      <div class="btn">立即付款</div>
    </div>
  </div>
</template>
<script setup lang="ts">
import { useOrder } from "./use/useOrder"
import ItemView from "./components/ItemView.vue"

const props = defineProps<{
  type: string
}>()

const { orderList } = useOrder(props.type)

</script>
<style lang="less" scoped>
.order-container {
  margin-top: 5px;
  .order-pay{
    background: #fff;
    border-top: 1px solid #f3f4f5;
    padding: 10px;
    display: flex;
    justify-content: flex-end;
    .btn{
      width: 100px;
      height: 30px;
      line-height: 30px;
      text-align: center;
      color: #fff;
      background: #684886;
      border-radius: 20px;
    }
  }
}
</style>
